"""
列表遍历
"""
a = (i for i in range(10))
print(a)
list1 = list(a)
print(type(a))
print(type(list1))
print("===========================")
for i in range(10):
    num = list1[i]
    print(f'i={i},list data={num}')

"""
列表切片
"""
list2 = [i for i in range(10)]
print(list2)
list3 = list2[::-1]
print(list3)
list4 = list2[0::2]
print(list4)
